package ex205;

import ex205.exp.ArithmeticExpression;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String exp = input.nextLine();
        ArithmeticExpression expression = new ArithmeticExpression(exp);
        System.out.println(expression.getRegularExpression());
        System.out.println(expression.getResult());
    }
}
